#include<iostream>
#include<vector>
using namespace std;
int main()
{
	//vector<int> v;
	//v.push_back(1);
	//v.push_back(2);
	//v.push_back(3);
	//v.push_back(4);
	//for (size_t i = 0; i < v.size(); ++i)
	//{
	//	cout << v[i] << " ";
	//}
	//cout << endl;
	//vector<int>::iterator vit = v.begin();
	//while (vit != v.end())
	//{
	//	cout << *vit << " ";
	//	++vit;
	//}
	vector<int> v1(5, 1);
	vector<int> v2(5, 2);
	cout << "v1:";
	for (auto e : v1)
	{
		cout << e << " ";
	}
	cout << endl << "v2:";
	for (auto e : v2)
	{
		cout << e << " ";
	}
	cout << endl;
	v1.swap(v2);
	cout << endl << "v1:";
	for (auto e : v1)
	{
		cout << e << " ";
	}
	cout << endl << "v2:";
	for (auto e : v2)
	{
		cout << e << " ";
	}
	cout << endl;

	return 0;
}
